package com.example.itemreader.fromfile;

import com.example.pojo.Customer;
import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author XieYa
 */
@Component("flatFileItemWriter")
public class FlatFileItemWriter implements ItemWriter<Customer> {
    @Override
    public void write(List<? extends Customer> list) {
        for (Customer customer : list) {
            System.out.println(customer);
        }
        System.out.println("---");
    }
}
